<template>
  <div class="history_wrapper">
      <child-header :title="title"></child-header>
      <section class=" p_t_82">
          <ul class="history_content font_25">
              <li v-for="(v,i) in historyList" :key="i" class="m_b_16" @click.stop="goTouserFilmDetail(params)">
                  <div class="history_title ">
                      <img src="@/assets/images/y.png" alt="">
                      <p>
                          {{v.TC_ST_CHK_TIME}}
                      </p>
                  </div>
                  
                  <div class="history_item p_l_92 line_h_50">
                    <p >胶片数：{{v.filmCount?v.filmCount:'0'}}     序列数：{{v.photoCount}}</p>
                    <p class="">{{v.TC_ST_TYPE}} {{v.TC_ST_BODY}}</p>
                    <p class="font_overflow" style="width: 95%;">{{v.TC_RP_FINDINGS}}</p>
                      <p class="font_overflow" style="width: 95%;">{{v.TC_RP_INSPECT_CON}}</p>
                  </div>
                  <div class="history_btns c_fff">
                      <div @click.stop="goToImgAndText(params)">
                          图文报告
                      </div>
                      <div  @click.stop="goToElectronicFilm(params)">
                          电子胶片
                      </div>
                      <div  @click.stop="goToImageBrowsing(params)">
                          影像浏览
                      </div>
                  </div>
              </li>
          </ul>
      </section>
  </div>
</template>

<script>
import { HttpService } from "../../provides/index";
export default {
  components: {},
  props: {},
  data() {
    return {
      title: "历史检查",
      historyList: [],
      params: {},
    };
  },
  watch: {},
  computed: {},
  methods: {
    goTouserFilmDetail(params) {
      this.$router.push({ path: "/userFilmDetail/"+params.studyid+'/'+params.hospcode+'/'+params.patientid+'/'+params.hospdomain });
    },
    goToImgAndText(params) {
      this.$router.push({ path: "/imgAndText/" +params.studyid+'/'+params.hospcode+'/'+params.patientid+'/'+params.hospdomain   });
    },
    goToElectronicFilm(params) {
      this.$router.push({ path: "/electronicFilm/"+params.studyid+'/'+params.hospcode+'/'+params.patientid+'/'+params.hospdomain  });
    },
    goToImageBrowsing(params) {
      this.$router.push({ path: "/imageBrowsing/"+params.studyid+'/'+params.hospcode+'/'+params.patientid+'/'+params.hospdomain  });
    },
    getHistoryList(params) {
      HttpService.api({
        url: "/history",
        params: params,
        headers: {}
      }).then(res => {
        this.historyList = res.result || [];
      });
    }
  },
  created() {},
  mounted() {
      this.params = {
       patientid: this.$route.query.patientid,
       studyid:this.$route.query.studyid,
       hospcode:this.$route.query.hospcode,
       hospdomain:this.$route.query.hospdomain
    }
    this.getHistoryList(this.$route.query);
  }
};
</script>
<style lang="scss" scoped>
.wrapper {
}
.history_content {
  color: rgb(115, 115, 115);
  padding: pxToRem(10);
  > li {
    border: 1px solid rgb(183, 183, 183);
    border-radius: pxToRem(7);
    box-shadow: pxToRem(3) pxToRem(4) pxToRem(5) rgba(0, 0, 0, 0.29);
    padding: pxToRem(23) 0;
    background: rgb(242, 242, 242);
    .history_title {
      display: flex;
      padding-left: .44rem;
      align-items: center;
      img {
        width: pxToRem(22);
        height: pxToRem(22);
        padding-right: .26rem;
      }
    }
    .history_item {
      margin-bottom: pxToRem(38);
    }
    .history_btns {
      display: flex;
      justify-content: space-around;
      div {
        border-radius: pxToRem(6);
        width: pxToRem(207);
        height: pxToRem(64);
        text-align: center;
        line-height: pxToRem(64);
        background: rgb(127, 181, 83);
      }
    }
  }
}
</style>